package Client.Manager
{
	import Client.Game.GlobalData;
	
	/**
	 * class		GameMgr
	 * @desc		used to manage the game flow
	 * @author		Aqua
	 * @date		2011-9-7
	 */
	public class GameMgr
	{
		//---------------------//
		//      Singleton      //
		//---------------------//
		
		/**************************************************************************
		 * function			instance getter
		 * @desc			a private function used to enforce singlton
		 * @return	void	singleton instance of this class
		 *************************************************************************/
		public static function get instance():void
		{
			if(null == _instance)
			{
				_instance = new void(singleton);
			}
		
			return _instance;
		}
		
		/**************************************************************************
		 * function			singleton
		 * @desc			a private function used to enforce singlton
		 *************************************************************************/
		private static function singleton():void
		{
			
		}
		
		
		//---------------------//
		//     Constructor     //
		//---------------------//
		
		/**************************************************************************
		 * function			void
		 * @desc			constructor of class
		 * @param	s		a private function used to enforce singlton
		 *************************************************************************/
		public function void(s:Function = null):void
		{
			if (singleton != s)
			{
				throw new Error("This is a singleton class!");
			}
		}
		
		
		//-----------------//
		//     Publics     //
		//-----------------//
		
		/**************************************************************************
		 * function				[getter] globalData
		 * @desc				get global data
		 * @return	GlobalData	a structure that contains global data
		 *************************************************************************/
		public function get globalData():GlobalData
		{
			return _globalData;
		}
		
		
		//------------------//
		//     Privates     //
		//------------------//
		
		
		public static const STAT_EVENT:String = "STAT_EVENT";
		public static const STAT_EVENT:String = "";
		public static const STAT_EVENT:String = "";
		public static const STAT_EVENT:String = "";
		
		private static var _instance:void;
		
		private var _globalData:GlobalData;
	}
	
}